package com.desire.config;

import com.desire.fallback.ServiceFallBack;
import com.desire.filter.ErrorFilter;
import com.desire.filter.RouterFilter;
import com.desire.filter.TokenFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @Author: littleDesire
 * @Date: 2022-06-10 9:24
 * @Version: 1.0
 */
@Configuration
public class FilterConfig {

    /**
     * @return 回退机制
     */
    @Bean
    public ServiceFallBack serviceFallBack() {
        return new ServiceFallBack();
    }

    @Bean
    TokenFilter tokenFilter() {
        return new TokenFilter();
    }

    @Bean
    RouterFilter routerFilter() {
        return new RouterFilter();
    }
    @Bean
    ErrorFilter errorFilter() {
        return new ErrorFilter();
    }
}
